class Food{
    ele:HTMLElement;
    constructor() {
        this.ele=document.querySelector('.food-item')!;
    }

    get X(){
        return this.ele.offsetLeft;
    }

    get Y(){
        return this.ele.offsetTop;
    }

    change(){
        let left=Math.round(Math.random()*29)*10;
        let top=Math.round(Math.random()*29)*10;
        this.ele.style.left=left+'px';
        this.ele.style.top=top+'px';

    }
}

export default Food;